<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="css/global.css" type="text/css" />
    <link rel="stylesheet" href="css/forms.css" type="text/css" />
    <link rel="stylesheet" href="css/toolbar.css" type="text/css" />
    <title>TP Final: Formulario Tramites</title>
</head>
<body>
	<!-- HEADER -->
    <div class="header">
        <nav>
            <ul>
                <li><a href="#">Herramientas</a>
                    <ul>
                        <li><a href="#">Buscar trámite</a></li>
                        <li><a href="#">Buscar cliente</a></li>
                        <li><a href="viewClients.do">Ver clientes</a></li>
                        <li><a href="#">Nuevo cliente</a></li>
                        <li><a href="viewTransactionType.do">Ver Tipos de Tramites</a></li>
                        <li><a href="transactionTypeSetUp.do">Nuevo Tipo de Tramite</a></li>
                        <li><a href="viewTransaction.do">Ver Tramite</a></li>
                        <li><a href="transactionSetUp.do">Nuevo Tramite</a></li>
                    </ul>
                </li>
                <li><a href="#">Salir</a></li>
            </ul>
        </nav>
    </div>
    <!-- MAIN BODY -->
    <div>
	    <h1 class="mainHeader">Formulario De Tramites</h1>
		<logic:notEmpty name="transactionForm" property="errors">
	    	<h2 class="warningHeader">${transactionForm.errors}</h2>
	    </logic:notEmpty>
		<html:form action="/transactionProcess" method="post">
			<fieldset>
				<label for="fromDate">
					<span class="styledForm">Desde:</span>
					<html:text name="transactionForm" property="fromDate" />
				</label>
			    <label for="toDate">
			    	<span class="styledForm">Hasta:</span>
					<html:text name="transactionForm" property="toDate" />
				</label>
		  	
		  		<label for="selectedPriorityName">
		  			<span class="styledForm">Prioridad:</span>
					<html:select property="selectedPriorityName" value="${transactionForm.selectedPriorityName}">
						<html:options collection="priorityComboBox" property="value" labelProperty="label"/>
					</html:select>	
				</label>
			    
			    <label for="selectedTransactionType">
		  			<span class="styledForm">Tipo de trámite:</span>
				    <html:select property="selectedTransactionType" value="${transactionForm.selectedTransactionType}">
						<html:options collection="transactionTypeComboBox" property="value" labelProperty="label"/>
					</html:select>
				</label>
		  		
		  		<label for="selectedStatus">
		  			<span class="styledForm">Estado:</span>
				    <html:select property="selectedStatus" value="${transactionForm.selectedStatus}">
						<html:options collection="statusComboBox" property="value" labelProperty="label"/>
					</html:select>
				</label>
				    
			    <html:hidden property="oid" />
			    <input type="hidden" name="dispatch" value="insertOrUpdate" />
			</fieldset>
			<fieldset class="checkboxGroup">
				<legend>Clientes participantes</legend>
				<ul class="checkbox">
					<logic:iterate name="clientListMultibox" id="clientListMultibox">
						<li>
							<html:multibox property="selectedItems">
								<bean:write name="clientListMultibox" property="value" />
							</html:multibox>
							<span class="styledForm"><bean:write name="clientListMultibox" property="label" /></span>
						</li>
					</logic:iterate>
				</ul>
			</fieldset>
			
	        <div>
	        	<html:submit>Enviar</html:submit>
	        	&nbsp;
	        	<html:submit onclick="document.transactionForm.dispatch.value='getAllTransaction'">Cancelar</html:submit>
	        </div>
		</html:form>
    </div>
    <!-- FOOTER -->
</body>
</html>

